<include file="Public/header" />
<title>管理员列表</title>
</head>
</head>
<body>
<div style="float:left;width:98%;">
		<table class="table table-border table-bordered table-bg welcometable">
			<tbody>
			  <tr class="text-c">
				<td>
					总共需要支付金额：<{:I('price')}>
				</td>
			  </tr>
			  <tr class="text-c">
				<td>
					<a href="javascript:;" onclick="confirm_alipay('<{:I('price')}>','<{:I('ids')}>')" class="btn btn-primary radius">确认支付</a>
				</td>
			  </tr>
			</tbody>
		</table>
</div>
    <include file="Public/footer_js" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script>
	function confirm_alipay(price,ids){
			alipay_url="http://www.t-cang.com/oms/index.php/Api/Zfb/toPay";
			order_no="OD00000"+parseInt(10000*Math.random())*parseInt(10000*Math.random());
			subject="TZ00000"+parseInt(10000*Math.random())*parseInt(10000*Math.random());
			total_fee=price;
			alipay_url=alipay_url+"/order_no/"+order_no+"/subject/"+subject+"/total_fee/"+total_fee;
			<!-- make_alipay_no(order_no,total_fee,ids); -->
			
			make_url='__MODULE__/order/make_alipay_no/'+Math.random(); //iframe的url
			$.ajax({
				type: 'POST',
				data: {order_no:order_no,total_fee:total_fee,ids:ids},
				url: make_url,
				success:function(data){
					if(data.status==0){	//检查通过，跳转生成波次单页面
						layer.msg(data.message);
					}else{
						window.open(alipay_url);
					}
				}
			})
	}


</script>
</body>
</html>